<?php

namespace App\Http\Exports;

use Illuminate\Support\Facades\DB;
use Maatwebsite\Excel\Concerns\FromQuery;
use Maatwebsite\Excel\Concerns\Exportable;
use Maatwebsite\Excel\Concerns\WithHeadings;
use App\Model\UserModel;

class QueryExport implements FromQuery,WithHeadings
{
    use Exportable;
    public function query()
    {
        return UserModel::query()->where(['corp_id'=>2]);
    }

    public function headings(): array
    {
        return [
          '#1',
          '#2',
          '#3',
          '#4',
          '#5',
          '#6',
          '#7',
          '#8',
          '#9',
          '#10',
          '#11',
          '#12',
        ];
    }

}
